<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <link rel="stylesheet" href="../../css/assets/dpl/base.css"/>
    <link rel="stylesheet" href="../../css/assets/dpl/forms.css"/>
    <link rel="stylesheet" href="../../button/assets/dpl.css"/>
    <script src="/kissy/tools/third-party/syntaxhighlighter_3.0.83/scripts/shCore.js"></script>
    <script src="/kissy/tools/third-party/syntaxhighlighter_3.0.83/scripts/shBrushJScript.js"></script>
    <link type="text/css" rel="stylesheet"
          href="/kissy/tools/third-party/syntaxhighlighter_3.0.83/styles/shCoreDefault.css"/>
    <script src="/kissy/tools/third-party/beautify.js"></script>
    <title> simple xtemplate </title>
</head>
<body>

<div class="container">

    <div class="row">

        <div class="span8">

            <h2>模板代码</h2>

            <div>
                <textarea style="width: 350px;height: 400px;" id="tpl">

                    {{3*4*5}}

                </textarea>
            </div>
            <br/>
            <button id='parse' class="ks-button">parse</button>
        </div>

        <div class="span15">
            <h2>Generated Template Function</h2>

            <div>
                <div id="gen">

                </div>
            </div>
        </div>

    </div>

</div>


<script src="/kissy/build/seed.js"></script>
<script src="/kissy/src/package.js"></script>
<script>

    KISSY.use("xtemplate,node", function (S, XTemplate) {
        var $ = S.all;
        $('#parse').on('click', function () {
            var g = XTemplate.compiler.parse($('#tpl').val());
            S.log(g);
        });
    });
</script>
</body>
</html>